ExamPlay Light Logo
เข้าสู่ระบบ

Computer Science for IGCSE & O level - Programming (Section 3 - No. 16)

What is the main difference between a local and a global variable?
Local variables can be used anywhere in the program, and global variables can only be used in a single function.
Global variables are only for numbers, and local variables are for text.
Local variables are declared inside a function, and global variables are declared outside any function.
Local variables are more efficient than global variables.

คำอธิบาย

The key difference is their scope - where they can be accessed in the code.

ความคิดเห็น (0)

เข้าสู่ระบบเพื่อแสดงความคิดเห็น
โฆษณา
BrainBehindX Inc Logo
©2026; ขับเคลื่อนโดย BrainBehindX Inc